package com.liveinstars.api.im;

import com.liveinstars.api.im.vo.CandyBoxVO;
import com.onepiece.shipelves.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author: zhouze
 * @date: 2020/3/20
 */
@FeignClient("im")
public interface CandyApi {

    /**
     * 创建红包
     * @param vo
     * @return
     */
    @PostMapping("/candy/createBox")
    Result<CandyBoxVO> createCandyBox(@RequestHeader("uid") Long userId, @RequestBody CandyBoxVO vo);

    /**
     * 获取candy
     * @param userId
     * @param candyBoxId
     * @return
     */
    @GetMapping("/candy/getCandy")
    Result<CandyBoxVO> getCandy(@RequestHeader("uid")Long userId, @RequestParam("candy_box_id") Long candyBoxId);

    /**
     * 获取红包详情
     * @param candyBoxId
     * @return
     */
    @GetMapping("/candy/getCandyBoxDetail")
    Result<CandyBoxVO> getCandyBoxDetail(@RequestParam("candy_box_id") Long candyBoxId);

}
